import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login'
import Home from '@/views/Home'
import Welcome from '@/views/Welcome'
import Users from '@/views/Users'
import Rights from '@/views/auth/Rights'
import Roles from '@/views/auth/Roles'

Vue.use(Router)

export default new Router(
  {
    routes: [
      {
        name: 'login',
        path: '/login',
        component: Login
      },
      {
        name: 'home',
        path: '/',
        component: Home,
        redirect: '/welcome',
        children: [
          {
            name: 'welcome',
            path: 'welcome',
            component: Welcome
          },
          {
            name: 'users',
            path: 'users',
            component: Users
          },
          {
            name: 'rights',
            path: 'rights',
            component: Rights
          },
          {
            name: 'roles',
            path: 'roles',
            component: Roles
          }
        ]
      }
    ]
  })
